home *** CD-ROM | disk | FTP | other *** search
/ Internet Made Easy / Internet Made Easy.iso / IME.exe / IME.DXR / 00027_Play Sound Member.ls < prev    next >
Encoding:
Text File  |  2004-11-30  |  1.1 KB  |  26 lines

  1. property mySound, myChannel, myMouseEvent
  2.  
  3. on getBehaviorDescription me
  4.   return "PLAY SOUND MEMBER" & RETURN & RETURN & "Plays a chosen sound member when the user clicks on the sprite." & RETURN & RETURN & "PERMITTED MEMBER TYPES:" & RETURN & "Graphic members/Sound members" & RETURN & RETURN & "PARAMETERS:" & RETURN & "* Play which sound?" & RETURN & "* Play sound in which channel?" & RETURN & "* Play sound on mouseUp or mouseDown?"
  5. end
  6.  
  7. on getBehaviorTooltip me
  8.   return "Use with graphic members." & RETURN & RETURN & "Plays a chosen sound member on" & RETURN & "either mouseUp or mouseDown."
  9. end
  10.  
  11. on mouseUp me
  12.   if myMouseEvent = #mouseUp then
  13.     puppetSound(myChannel, mySound)
  14.   end if
  15. end
  16.  
  17. on mouseDown me
  18.   if myMouseEvent = #mouseDown then
  19.     puppetSound(myChannel, mySound)
  20.   end if
  21. end
  22.  
  23. on getPropertyDescriptionList me
  24.   return [#mySound: [#comment: "Play which sound?", #format: #sound, #default: EMPTY], #myChannel: [#comment: "Play sound in which channel?", #format: #integer, #default: "1"], #myMouseEvent: [#comment: "Play sound on:", #format: #symbol, #range: [#mouseUp, #mouseDown], #default: #mouseUp]]
  25. end
  26.